<template>
  <!-- 主页容器框架 -->
  <div class="home">
    <!-- 定义顶部背景及组件样式 -->
    <home-top />
    <!-- 定义导航栏 -->
    <home-navigation class="d-none d-md-block" />
    <!-- 定义书籍推荐 -->
    <home-list />
    <!-- 定义页脚 -->
    <home-footer class="d-none d-md-block" />
    <!-- 定义移动端脚页 -->
    <div class="d-block d-md-none">
      <footer-text-s-m />
      <mobile-banner /> 
    </div>
  </div>
</template>

<script>
  import HomeTop from './HomeComponents/HomeTop'
  import HomeNavigation from './HomeComponents/HomeNavigation'
  import HomeList from './HomeComponents/HomeList'
  import HomeFooter from './HomeComponents/HomeFooter'
  import FooterTextSM from 'components/FooterText/FooterTextSM'
  import MobileBanner from 'components/Mobile/MobileBanner'


  export default {
    name: 'Home',
    components: {
      HomeTop,
      HomeNavigation,
      HomeList,
      HomeFooter,
      FooterTextSM,
      MobileBanner
    },
    data () {
      return {

      }
    },
    // 在组件渲染前更改是否刷新书籍页的判断值
    beforeRouteEnter(to, from, next) {
      localStorage.setItem('bannerFlag', true);
      next();
    }
  }
</script>

<style scoped>
 
</style>